<template>
	<view class="main-view">
		<view class="center-view">
			<image src="/static/mt_logo.jpg" class="logo"></image>
			<view class="title">服务协议和隐私条款</view>
			<view>欢迎您使用民泰惠生活小程序。请您仔细阅读并充分理解<text class="agreement-link" @click="linkTo(1)">《民泰惠生活用户隐私政策》</text>、<text class="agreement-link" @click="linkTo(2)">《民泰惠生活平台服务协议》</text>，如您同意全部内容，请点击“同意”开始使用我们的服务。</view>
			<view class="agree-btn" @click="linkTo(3)">同意</view>
			<navigator open-type="exit" target="miniProgram">不同意</navigator>
		</view>
	</view>
</template>

<script>
	import { staticBaseUrl } from '@/utils/constant.js';
	
	export default {
		data() {
			return {
				
			}
		},
		onLoad(options) {
			
		},
		methods: {
			linkTo: function(type){
				let app = getApp();
				let url = '/pages/agreement/agreement?type=' + type;
				if(type == 3 ){ 
					url = (null == app.globalData.userInfo) ? '/pages/regist/regist' : '/pages/regist/phoneVerify'
				}
				uni.redirectTo({
					url: url
				});
			}
		}
	}
</script>

<style>
	.main-view{
		background-color: #AC242D;
		width: 100%;
		height: 100vh;
		display: flex;
		align-items: center;
	}
	
	.center-view{
		background-color: #fff;
		border-radius: 50rpx;
		position: relative;
		padding: 40rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		margin: 0 50rpx;
		font-size: 30rpx;
		color: #676666;
	}
	
	.agree-btn{
		background-color: #D63037;
		width: 100%;
		text-align: center;
		padding: 20rpx;
		border-radius: 50rpx;
		color: #fff;
		font-size: 32rpx;
		margin-top: 60rpx;
		margin-bottom: 20rpx;
	}
	
	.title{
		font-size: 36rpx;
		margin-top: 30rpx;
		margin-bottom: 30rpx;
		color: #444244;
	}
	
	.logo{
		width: 120rpx;
		height: 120rpx;
		position: absolute;
		left: calc(50% - 60rpx);
		top: -80rpx;
		border-radius: 30rpx;
		border: 1rpx solid #fff;
	}
	
	.agreement-link{
		color: #D63037;
	}

</style>
